﻿using System;
using DotNetNuke.Entities.Content;
using DotNetNuke.Entities.Content.Common;

namespace RickDnn.Modules.DNNTaskManager.Components.Taxonomy
{
    public class Terms
    {     

        public void ManageTaskTerms(Task objTask, ContentItem objContent)
        {
            RemoveTaskTerms(objContent);
            foreach (var term in objTask.Terms )
            {
                Util.GetTermController().AddTermToContent(term,objContent);
            }
        }
       
        public void RemoveTaskTerms(ContentItem objContent)
        {
            Util.GetTermController().RemoveTermsFromContent(objContent);
        }
    }
}